package HomeWork;

import java.io.FileWriter;

public class Demo03 {
    public static void main(String[] args) {
        try (FileWriter fw=new FileWriter("aaa.txt")){
            fw.write("登鹳雀楼");
            fw.write(System.lineSeparator());
            fw.write("王之涣");
            fw.write(System.lineSeparator());
            fw.write("白日依山尽" +
                    System.lineSeparator()+
                    "黄河入海流" +
                    System.lineSeparator()+
                    "欲穷千里目" +
                    System.lineSeparator()+
                    "更上一层楼");

        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
